
import Vue from 'vue'
import '@/assets/theme/element-variables.scss'
import {
  Pagination,
  Dialog,
  Autocomplete,
  Dropdown,
  DropdownMenu,
  DropdownItem,
  Menu,
  Submenu,
  MenuItem,
  MenuItemGroup,
  Input,
  InputNumber,
  Radio,
  RadioGroup,
  RadioButton,
  Checkbox,
  CheckboxButton,
  CheckboxGroup,
  Switch,
  Select,
  Option,
  OptionGroup,
  Button,
  ButtonGroup,
  Table,
  TableColumn,
  DatePicker,
  TimeSelect,
  TimePicker,
  Popover,
  Tooltip,
  Breadcrumb,
  BreadcrumbItem,
  Form,
  FormItem,
  Tabs,
  TabPane,
  Tag,
  Tree,
  Alert,
  Slider,
  Icon,
  Row,
  Col,
  Upload,
  Progress,
  Spinner,
  Badge,
  Card,
  Rate,
  Steps,
  Step,
  Carousel,
  CarouselItem,
  Collapse,
  CollapseItem,
  Cascader,
  ColorPicker,
  Transfer,
  Container,
  Header,
  Aside,
  Main,
  Footer,
  Timeline,
  TimelineItem,
  Link,
  Divider,
  Image,
  Calendar,
  Backtop,
  PageHeader,
  CascaderPanel,
  Loading,
  MessageBox,
  Message,
  Notification,
  Avatar,
  Empty,
  Statistic,
  Scrollbar,
  Confirm
} from 'element-ui';
import locale from 'element-ui/lib/locale/lang/en'

const components = [
  Button,
  Form,
  FormItem,
  Input,
  Upload,
  Dialog,
  Pagination,
  Checkbox,
  MessageBox,
  Message,
  Select,
  Option,
  Rate,
  Image,CheckboxGroup,
  Row,
  Col,
  Collapse,
  CollapseItem,
  Tabs,
  TabPane,
  Carousel,
  CarouselItem,
  InputNumber,
  DatePicker,
  TimeSelect,
  Divider,
  Steps,
  Step,
  Dropdown,
  DropdownMenu,
  DropdownItem,
  MenuItem,
  Avatar,
  Image,
  Menu,
  Card,
  Empty,
  Tag,
  Statistic,
  Table,
  TableColumn,
  Scrollbar,
  Main,
  Container,
  Aside,
  Breadcrumb,
  BreadcrumbItem,
  Alert,
  RadioButton,
  RadioGroup,
  Timeline,
  TimelineItem,
  Radio,
  Badge,
  Submenu,
  Popover
];

const Element = {
  install (Vue) {
    components.forEach(component => {
      Vue.component(component.name, component)
    })
  }
}

Vue.use(Element, { locale })
Vue.prototype.$message = Message
Vue.prototype.$messageBox = MessageBox
Vue.use(Loading.directive);
